<?php
namespace Home\Controller;
use Think\Controller;
class ArticleController extends Controller {
	public function article(){
		//文章专栏:
        $article=M('articlecolumn');
        $hotData=$article->where('type=1')->order('articleDate desc')->limit(5)->select();
        $recData=$article->where('type=2')->order('articleDate desc')->limit(5)->select();
        $selData=$article->where('type=3')->order('articleDate desc')->limit(3)->select();
        $uiData=$article->where('type=4')->order('articleDate desc')->limit(7)->select();
        $this->assign('hotData',$hotData);
        $this->assign('recData',$recData);
        $this->assign('selData',$selData);
        $this->assign('uiData',$uiData);
    	
        //banner:
        $banner=M('banner');
        $bannerlist=$banner->select();
        $this->assign('bannerlist',$bannerlist);
        $this->display();
    }

}